var stus = [{
        stuNum: 1101,
        name: '曹操',
        score: 95
    },
    {
        stuNum: 1102,
        name: '吕布',
        score: 50
    },
    {
        stuNum: 1103,
        name: '貂蝉',
        score: 65
    },
    {
        stuNum: 1104,
        name: '赵云',
        score: 71
    }
];
var tb = document.getElementById('tb')
var filterBtn = document.getElementById('filter')
var scoreIpt = document.getElementById('lower')

function scoreFilter(stus, score) {
    return stus.filter(function (item) {
        return item.score >= score
    })
}
filterBtn.onclick = function () {
    var score = parseFloat(scoreIpt.value)
    console.log(score)
    var fStus = scoreFilter(stus, score)
    var stusHtml = fStus.map(function (item) {
        return `<tr>
        <td>${item.stuNum}</td>
        <td>${item.name}</td>
        <td>${item.score}</td>
        </tr>`
    })
    var html = stusHtml.join('')
    tb.innerHTML = html
}